package com.tfswue.zqm.listener;

import com.tfswue.zqm.event.UserRegisteredEvent;
import org.slf4j.Logger; // 修改为 SLF4J 的 Logger
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class UserEventListener implements ApplicationListener<UserRegisteredEvent> {
    private static final Logger logger = org.slf4j.LoggerFactory.getLogger(UserEventListener.class); // 使用 SLF4J LoggerFactory

    @Override
    public void onApplicationEvent(UserRegisteredEvent event) {
        logger.info("记录用户注册日志：{} | {}", event.getUsername(), event.getEmail());
    }
}